package cn.opopopo.design_pattern_learn.创建型.abstract_factory;

// 6. 测试类
public class AbstractFactoryDemo {
    public static void main(String[] args) {
        String os = "mac"; // 可以是 "windows" 或 "mac"

        GUIFactory factory;
        if ("windows".equals(os)) {
            factory = new WindowsFactory();
        } else {
            factory = new MacFactory();
        }

        Application app = new Application(factory);
        app.render();
    }
}